﻿using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Qy.Scenario;
[SugarTable(DbTableName.OasDocReceived)]

public class DocReceived
{
    [SugarColumn(IsPrimaryKey = true)]
    /// <summary>
    /// ID
    /// </summary>
    public int Id { get; set; }
    /// <summary>
    /// 类别
    /// </summary>
    public int Cid { get; set; }
    /// <summary>
    /// 标题
    /// </summary>
    public string Title { get; set; }
    /// <summary>
    /// 附件
    /// </summary>
    public string Attments { get; set; }
    /// <summary>
    /// 用户ID
    /// </summary>
    public int Uid { get; set; }
    /// <summary>
    /// 状态标识
    /// </summary>
    public int Miji { get; set; } = 0;
    /// <summary>
    /// 信息报送时间
    /// </summary>
    public DateTime GreatTime { get; set; }
    /// <summary>
    /// 写入系统时间
    /// </summary>
    public DateTime InsertTime { get; set; } = DateTime.Now;
    /// <summary>
    /// 文号
    /// </summary>
    public string DocNumber { get; set; }

    /// <summary>
    /// 来文部门
    /// </summary>
    public string Department { get; set; }

    /// <summary>
    /// 备注
    /// </summary>
    public string Remarks { get; set; }
    /// <summary>
    /// 经办人
    /// </summary>
    public string Clercator { get; set; }
}


public class EditDocReceived
{
    public int Id { get; set; }
    [Display(Name = "类别")]
    [Required(ErrorMessage = "请选择类别")]
    public int Cid { get; set; }
    public int Uid { get; set; }
    [Display(Name = "文件标题")]
    [Required(ErrorMessage = "文件标题未填写")]
    public string Title { get; set; }
    public string Attments { get; set; }

    [Display(Name = "来文时间")]
    [Required(ErrorMessage = "来文时间未填写")]
    public DateTime GreatTime { get; set; }
    public DateTime InsertTime { get; set; } = DateTime.Now;
    [Display(Name = "密级")]
    public int Miji { get; set; }

    [Display(Name = "文号")]
    public string DocNumber { get; set; }
    [Display(Name = "来文部门")]
    public string Department { get; set; }
    [Display(Name = "经办人")]
    public string Clercator { get; set; }

    [Display(Name = "备注")]
    public string Remarks { get; set; }
    public string CateName { get; set; }
    public string Groupname { get; set; }
}

public class ViewDocReceivedAndCate
{
    public int Id { get; set; }
    public int Cid { get; set; }
    public string Title { get; set; }
    public string CateName { get; set; }
    public string DeptName { get; set; }
    public string Nickname { get; set; }
    public int Miji { get; set; }
    public DateTime GreatTime { get; set; }
    public DateTime InsertTime { get; set; }
    public string DocNumber { get; set; }
    public string Department { get; set; }
    public string Clercator { get; set; }
    public string Remarks { get; set; }
}



/// <summary>
/// 查询模型
/// </summary>
public class DocReceivedQuery :PagerInfo
{
    public int[] Cids { get; set; } = null;
    public string Orderby { get; set; }
    public int Miji { get; set; } = -1;
    public int Uid { get; set; }
    public string Title { get; set; }
    public string Clercator { get; set; }
    public string DocNumber { get; set; }
    public string Department { get; set; }
    public List<int> Uids { get; set; }
    public bool ExportExcel { get; set; } = false;
}


